<?php
namespace Ucmaim\Controller\Admin;
use Think\Controller;

class CommonController extends Controller {
    protected $pageSize;
    protected $manager_info;

    public function _initialize(){
        $this->manager_info = $this->LoginAuth();
        if( false === $this->manager_info ){
            $this->redirect('Admin/Auth/Login');
        }
        $this->pageSize = C('ADMIN_LIST_PAGE_SIZE');
    }

    // 登陆认证
    public function LoginAuth(){
        $Admin = A('Admin/Auth');
        $name = $Admin::getAuthSessionName();
        $manager_info = session($name);
        return empty($manager_info) ? false : $manager_info;
    }
}
